﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TestWPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        Product product = null;
        ProductPlain plain = null;

        public MainWindow()
        {
            InitializeComponent();
                
            
        }


        private Product GetDataContext()
        {
            Product productDataSource = new Product();
            return productDataSource;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            product = new Product();
            plain = new ProductPlain();

            MyGrid.DataContext = product;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            product.ProductId = 400;
            plain.ProductId = 90;
        }

        private void btn_Click(object sender, RoutedEventArgs e)
        {
            contentLbl.Content = "New value";
        }
    }
}
